package com.mokio.swaggerdemo.controller;

import com.mokio.swaggerdemo.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

/**
 * @program: IDEA Projects
 * @ClassName UserController
 * @description:
 * @author: Mokio
 * @create: 2024−12-09 20:19
 * @Version 2024 2.2 ; jdk1.8.0_181
 **/
@Api
@RestController
public class UserController {

    @ApiOperation("注册")
    @PostMapping("/register")
    public String register(@RequestBody User user){

        return "this is register";
    }

    @ApiOperation("哈喽啊")
    @RequestMapping("/hello")
    public String hello(
            @ApiParam("姓名")
            @RequestParam String names){
        return "this is register too";
    }
}
